Filename | (eval 1030)[/usr/share/perl/5.10/CGI.pm:869] |
Statements | Executed 10 statements in 34µs |
Eval Invoked At | /usr/share/perl/5.10/CGI.pm line 869 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 27µs | 32µs | read_from_cmdline | CGI::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 32µs (27+5) within CGI::read_from_cmdline which was called:
# once (27µs+5µs) by CGI::init at line 832 of CGI.pm | ||||
2 | 1 | 500ns | my($input,@words); | ||
3 | 1 | 200ns | my($query_string); | ||
4 | 1 | 300ns | my($subpath); | ||
5 | 1 | 2µs | if ($DEBUG && @ARGV) { | ||
6 | @words = @ARGV; | ||||
7 | } elsif ($DEBUG > 1) { | ||||
8 | require "shellwords.pl"; | ||||
9 | print STDERR "(offline mode: enter name=value pairs on standard input; press ^D or ^Z when done)\n"; | ||||
10 | chomp(@lines = <STDIN>); # remove newlines | ||||
11 | $input = join(" ",@lines); | ||||
12 | @words = &shellwords($input); | ||||
13 | } | ||||
14 | 1 | 2µs | for (@words) { | ||
15 | 1 | 5µs | 1 | 2µs | s/\\=/%3D/g; # spent 2µs making 1 call to CGI::CORE:subst |
16 | 1 | 4µs | 1 | 400ns | s/\\&/%26/g; # spent 400ns making 1 call to CGI::CORE:subst |
17 | } | ||||
18 | |||||
19 | 1 | 13µs | 1 | 3µs | if ("@words"=~/=/) { # spent 3µs making 1 call to CGI::CORE:match |
20 | $query_string = join('&',@words); | ||||
21 | } else { | ||||
22 | $query_string = join('+',@words); | ||||
23 | } | ||||
24 | 1 | 3µs | 1 | 600ns | if ($query_string =~ /^(.*?)\?(.*)$/) # spent 600ns making 1 call to CGI::CORE:match |
25 | { | ||||
26 | $query_string = $2; | ||||
27 | $subpath = $1; | ||||
28 | } | ||||
29 | 1 | 5µs | return { 'query_string' => $query_string, 'subpath' => $subpath }; | ||
30 | } | ||||
31 | |||||
32 | ; |